package com.nisco.dms.repository.mybatis;

import java.util.List;
import java.util.Map;

/**
 * 
 * @author Robin
 * @createDate 2012-12-18 下午13:16
 * @param <T>
 */
public interface BaseDao<T> {
	public boolean save(String classMethod, T entity) throws Exception;

	public boolean update(String classMethod, T entity) throws Exception;

	public boolean delete(String classMethod, T entity) throws Exception;

	public T get(String classMethod, T entity) throws Exception;

	public List<T> getAll(String classMethod) throws Exception;
	
	/**
	 * 分页查询，根据当前页和每页大小
	 * @param parameters
	 * @return
	 * @throws Exception
	 */
	public List<T> getAllByPage(Map<String, Object> parameters) throws Exception;
}
